package com.infocollect.project.grant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.infocollect.project.grant.mapper.GrUserCompanyMapper;
import com.infocollect.project.grant.domain.GrUserCompany;
import com.infocollect.project.grant.service.IGrUserCompanyService;

/**
 * 派出单位用户Service业务层处理
 * 
 * @author infocollect
 * @date 2022-06-12
 */
@Service
public class GrUserCompanyServiceImpl implements IGrUserCompanyService 
{
    @Autowired
    private GrUserCompanyMapper grUserCompanyMapper;

    /**
     * 查询派出单位用户
     * 
     * @param id 派出单位用户ID
     * @return 派出单位用户
     */
    @Override
    public GrUserCompany selectGrUserCompanyById(Long id)
    {
        return grUserCompanyMapper.selectGrUserCompanyById(id);
    }

    /**
     * 查询派出单位用户列表
     * 
     * @param grUserCompany 派出单位用户
     * @return 派出单位用户
     */
    @Override
    public List<GrUserCompany> selectGrUserCompanyList(GrUserCompany grUserCompany)
    {
        return grUserCompanyMapper.selectGrUserCompanyList(grUserCompany);
    }

    /**
     * 新增派出单位用户
     * 
     * @param grUserCompany 派出单位用户
     * @return 结果
     */
    @Override
    public int insertGrUserCompany(GrUserCompany grUserCompany)
    {
        return grUserCompanyMapper.insertGrUserCompany(grUserCompany);
    }

    /**
     * 修改派出单位用户
     * 
     * @param grUserCompany 派出单位用户
     * @return 结果
     */
    @Override
    public int updateGrUserCompany(GrUserCompany grUserCompany)
    {
        return grUserCompanyMapper.updateGrUserCompany(grUserCompany);
    }

    /**
     * 批量删除派出单位用户
     * 
     * @param ids 需要删除的派出单位用户ID
     * @return 结果
     */
    @Override
    public int deleteGrUserCompanyByIds(Long[] ids)
    {
        return grUserCompanyMapper.deleteGrUserCompanyByIds(ids);
    }

    /**
     * 删除派出单位用户信息
     * 
     * @param id 派出单位用户ID
     * @return 结果
     */
    @Override
    public int deleteGrUserCompanyById(Long id)
    {
        return grUserCompanyMapper.deleteGrUserCompanyById(id);
    }
}
